using System;
using System.Windows.Media.Animation;

// ReSharper disable CheckNamespace
namespace DevPhone.Controls
// ReSharper restore CheckNamespace
{
    /// <summary>
    /// Controls the behavior of transitions.
    /// </summary>
    public interface ITransition
    {
        /// <summary>
        /// Occurs when the
        /// Microsoft.Phone.Controls.ITransition
        /// has completed playing.
        /// </summary>
        event EventHandler Completed;

        /// <summary>
        /// Gets the
        /// Windows.Media.Animation.ClockState
        /// of the
        /// Microsoft.Phone.Controls.ITransition
        /// </summary>
        /// <returns></returns>
        ClockState GetCurrentState { get; }

        /// <summary>
        /// Gets the current time of the
        /// Microsoft.Phone.Controls.ITransition
        /// </summary>
        /// <returns>The current time.</returns>
        TimeSpan GetCurrentTime { get; }

        /// <summary>
        /// Pauses the animation clock associated with the
        /// Microsoft.Phone.Controls.ITransition
        /// </summary>
        void PauseTransition();

        /// <summary>
        /// Resumes the animation clock, or run-time state, associated with the
        /// Microsoft.Phone.Controls.ITransition
        /// </summary>
        void ResumeTransition();

        /// <summary>
        /// Moves the
        /// Microsoft.Phone.Controls.ITransition
        /// to the specified animation position. The
        /// T:Microsoft.Phone.Controls.ITransition
        /// performs the requested seek when the next clock tick occurs.
        /// </summary>
        /// <param name="offset">The specified animation position.</param>
        void Seek(TimeSpan offset);

        /// <summary>
        /// Moves the
        /// Microsoft.Phone.Controls.ITransition
        /// to the specified animation position immediately (synchronously).
        /// </summary>
        /// <param name="offset">The specified animation position</param>
        void SeekAlignedToLastTick(TimeSpan offset);

        /// <summary>
        /// Advances the current time of the
        /// Microsoft.Phone.Controls.ITransition
        /// clock to the end of its active period.
        /// </summary>
        void SkipToFill();

        /// <summary>
        /// Initiates the set of animations associated with the
        /// Microsoft.Phone.Controls.ITransition
        /// </summary>
        void Begin();

        /// <summary>
        /// Stops the Microsoft.Phone.Controls.ITransition
        /// </summary>
        void StopTransition();
    }
}